package com.young.fragments.demo.simple_jump_demo.fms

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.young.fragments.databinding.FmSimpleJumpTarget2Binding
import com.young.lib_fragments.fms.BaseLazyFragment

/**
 * @author huangzehui
 * @date 2025/1/24 11:21 周五
 * @description 简单跳转的目标fragment
 */
class SimpleJumpTargetFragment2 : BaseLazyFragment(), View.OnClickListener {

    private lateinit var mBinding: FmSimpleJumpTarget2Binding

    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        mBinding = FmSimpleJumpTarget2Binding.inflate(inflater, container, false)
        return mBinding.root
    }


    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        initClick()
    }

    override fun onClick(v: View?) {
        when (v) {
            mBinding.btnLast -> {
//                FmTransitionsUtil.pop(parentFragmentManager)
                pop()
            }

            else -> {}
        }
    }


    private fun initClick() {
        mBinding.btnLast.setOnClickListener(this)
    }


}